/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
 *
 */

import path from 'path';

import { CommonConst } from '../../../const/common-const.js';
import { TaskNames } from '../../common/task-names.js';
import { ModuleTaskService } from '../../service/module-task-service.js';
import { AbstractModuleHookTask } from '../abstract-module-hook-task.js';
import CommonHookTask = TaskNames.CommonHookTask;

export abstract class AbstractPreviewerRes extends AbstractModuleHookTask {
  protected syscapJsonPath: string;

  protected constructor(moduleService: ModuleTaskService, isFaMode: boolean) {
    super(moduleService, isFaMode, CommonHookTask.BUILD_PREVIEWER_RES);
    this.syscapJsonPath = path.resolve(moduleService.getModuleModel()?.getSourceRootByTargetName(), CommonConst.SYSCAP_JSON);
  }
}
